# input  控制台输入  字符串类型

# age = int(input("请输入年龄:"))
age = 19
if age < 18:
    print("未成年")
elif age >= 18:
    print("成年")
else:
    print("....")

l = [1, 2, 3, 4, 5, 6]

for i in l:
    print(i)

# 计算100以内数字的和

i = 0
sum = 0

while i <= 100:
    sum = sum + i
    i += 1
    # i = i + 1

print(sum)

l = [1, 2, 3, 4, 5, 6]

l1 = []
for i in l:
    l1.append(i * 2)

print(l1)

# 列表推导式
l2 = [i * 2 for i in l]
print(l2)

# enumerate  遍历过程中获取下标
for i, t in enumerate(l):
    print(i, t, sep="\t")
